package day_14.homework;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author ck
 * @date2021/8/22 22:41
 */
@SuppressWarnings("all")
public class homework4_1 {
    public static void main(String[] args) {
        //创建一个阻塞队列对象 设置容量为1
        ArrayBlockingQueue<String> bq = new ArrayBlockingQueue<>(1);
        //创建线程，将阻塞队列作为参数加进去
        Cooker_1 c = new Cooker_1(bq);
        Foodie_1 f = new Foodie_1(bq);

        //开启两个线程
        c.start();
        f.start();
    }
}
